/PROG  PNS0014
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "P0225162";
PROG_SIZE	= 3149;
CREATE		= DATE 22-09-08  TIME 08:28:48;
MODIFIED	= DATE 24-09-29  TIME 19:22:54;
FILE_NAME	= PNS0071;
VERSION		= 0;
LINE_COUNT	= 120;
MEMORY_SIZE	= 3597;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0051 ;
   7:  !  PART:53301125 ;
   8:  !ZYL15-7-16********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  DO[38]=OFF ;
  13:  R[14]=90    ;
  14:  R[18]=1    ;
  15:  R[19]=.1    ;
  16:  R[35]=TIMER[4]    ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[1] ;
  24:  CALL ARM_CHECK    ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  28:   ;
  29:  PR[6]=PR[12]    ;
  30:  R[1]=0    ;
  31:  TIMER[1]=RESET ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5] ;
  35:   ;
  36:   ;
  37:  !PROCEED TO PICK ;
  38:  LBL[20] ;
  39:  IF DI[1]=ON AND DI[2]=ON,JMP LBL[40] ;
  40:  IF DI[29]=ON,JMP LBL[90] ;
  41:  JMP LBL[20] ;
  42:  LBL[40:MEASURE HEIGH?] ;
  43:  IF DI[2]=ON AND DI[4]=ON AND DI[44]=ON AND DI[46]=ON,JMP LBL[70] ;
  44:   ;
  45:  IF DI[2]=ON AND DI[4]=ON AND DI[44]=ON,JMP LBL[30] ;
  46:  IF DI[29]=ON,JMP LBL[90] ;
  47:   ;
  48:  JMP LBL[40] ;
  49:  LBL[70:MEASURE HEIGHT !] ;
  50:  OVERRIDE=R[5] ;
  51:   ;
  52:  PR[5]=PR[12]    ;
  53:  PR[5,3]=PR[12,3]-500    ;
  54:J P[3:SAFE POUNCE] 30% CNT100    ;
  55:  SKIP CONDITION DI[9]=ON OR DI[11]=ON    ;
  56:  CALL PARTPICK    ;
  57:L PR[12] 100mm/sec CNT30    ;
  58:L PR[5] 70mm/sec CNT30 Skip,LBL[80],PR[6]=LPOS    ;
  59:  LBL[80] ;
  60:  DO[37]=PULSE,1.0sec ;
  61:  CALL PARTDROP    ;
  62:  DO[41]=PULSE,2.0sec ;
  63:   ;
  64:J P[3:SAFE POUNCE] 30% CNT100    ;
  65:  PAUSE ;
  66:  JMP LBL[30] ;
  67:   ;
  68:  LBL[30:GOTO DROP POUNCE] ;
  69:  OVERRIDE=R[5] ;
  70:J P[3:SAFE POUNCE] 30% CNT100    ;
  71:  DO[38]=ON ;
  72:  R[45]=PR[6,3]    ;
  73:  IF R[45]<=(-1900) OR DI[29]=ON,JMP LBL[90] ;
  74:   ;
  75:  IF DI[2]=ON AND DI[4]=ON AND DI[44]=ON,JMP LBL[50] ;
  76:  JMP LBL[30] ;
  77:  LBL[50:MOVE DROP SNEAK] ;
  78:  OVERRIDE=R[5] ;
  79:  IF R[45]<=(-1520),JMP LBL[98] ;
  80:  JMP LBL[99] ;
  81:  LBL[98] ;
  82:  DO[40]=PULSE,1.0sec ;
  83:  LBL[99] ;
  84:   ;
  85:   ;
  86:L PR[6] 500mm/sec CNT0 DB  150.0mm,DO[37]=PULSE,1.5sec ACC100    ;
  87:   ;
  88:L PR[6] 500mm/sec CNT0 TB   1.00sec,CALL PARTPICK ACC100    ;
  89:  CALL CHK_PICK    ;
  90:  WAIT    .70(sec) ;
  91:L P[5] 1000mm/sec CNT30    ;
  92:  WAIT DI[4]=ON AND DI[5]=ON AND DI[38]=ON AND DI[45]=OFF    ;
  93:  PR[6,3]=PR[6,3]-2    ;
  94:  DO[38]=OFF ;
  95:J P[10] 30% CNT30    ;
  96:  CALL CHK_PICK    ;
  97:J P[11:DROP] 20% CNT5 TB R[19]sec,CALL PARTDROP    ;
  98:  DO[6]=PULSE,1.0sec ;
  99:J P[12] 50% CNT50    ;
 100:  CALL CHK_DROP    ;
 101:J P[9] 50% CNT100    ;
 102:  DO[38]=ON ;
 103:  IF DI[29]=ON,JMP LBL[90] ;
 104:  IF DI[44]=ON,JMP LBL[30] ;
 105:  JMP LBL[86] ;
 106:  LBL[86] ;
 107:  DO[22]=PULSE,3.0sec ;
 108:  JMP LBL[89] ;
 109:  LBL[89] ;
 110:  IF DI[29]=ON,JMP LBL[90] ;
 111:  JMP LBL[10] ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:J P[3:SAFE POUNCE] 100% CNT100    ;
 115:J P[8:DROP POUNCE] 5% CNT100    ;
 116:J P[2:PICK POUNCE] 10% CNT100    ;
 117:  MOVE TO HOME    ;
 118:  DO[38]=OFF ;
 119:  R[38]=0    ;
 120:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2659.957  mm,	Y =  -743.334  mm,	Z =  -927.922  mm,
	W =  -179.311 deg,	P =      .574 deg,	R =   -89.997 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2657.790  mm,	Y =  -744.000  mm,	Z =  -936.231  mm,
	W =  -179.311 deg,	P =      .573 deg,	R =   -90.000 deg
};
P[3:"SAFE POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2561.875  mm,	Y = -2094.680  mm,	Z =  -718.606  mm,
	W =  -179.462 deg,	P =      .599 deg,	R =   -90.015 deg
};
P[5]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2561.875  mm,	Y = -2094.680  mm,	Z =  -718.606  mm,
	W =  -179.462 deg,	P =      .599 deg,	R =   -90.015 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2487.000  mm,	Y = -1405.211  mm,	Z =  -830.000  mm,
	W =  -179.305 deg,	P =      .575 deg,	R =   -89.997 deg
};
P[9]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2561.875  mm,	Y = -2094.680  mm,	Z =  -718.606  mm,
	W =  -179.462 deg,	P =      .599 deg,	R =   -90.015 deg
};
P[10]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2546.997  mm,	Y = -2831.475  mm,	Z =  -703.726  mm,
	W =  -179.462 deg,	P =      .599 deg,	R =   -89.313 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2546.997  mm,	Y = -2831.475  mm,	Z =  -789.646  mm,
	W =  -179.462 deg,	P =      .599 deg,	R =   -89.313 deg
};
P[12]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2546.997  mm,	Y = -2831.475  mm,	Z =  -703.726  mm,
	W =  -179.462 deg,	P =      .599 deg,	R =   -89.313 deg
};
/END
